Multithread auto test method

ABSTRACT

A multithread auto test method is disclosed for the test process of computer hardware. According to the exclusion relation among the unique IDs of the test items, a multithread executable logic is automatically generated. An appropriate parallel method is employed to find procedures for test items that do not have conflictions. Therefore, multithreads of test procedures are performed to increase the test efficiency and quality. The method includes the steps of: determining a unique ID of a test item; automatically generating a test logic table according to the exclusion relation among the unique IDs; and performing multithread test procedure according to the test logic given in the test logic table.

BACKGROUND OF THE INVENTION

[0001] 1. Field of Invention

[0002] The invention relates to a test method and, in particular, to amultithread auto test method for computer hardware tests.

[0003] 2. Related Art

[0004] Normally, computer hardware in a Windows environment is testedusing the serial test method. As shown in FIG. 1A, hardware test itemsare performed one after another. Although this method has the advantageof no interference between each individual tests, it does have thefollowing drawbacks.

[0005] (1) The test efficiency is low. A test is not started until itsprevious test is done. Therefore, it takes a longer time to finish allthe test items of the computer. Of course, the yield efficiency of theassembly thread is seriously affected.

[0006] (2) It has potential test loopholes. The serial test method doesnot consider the situation of testing several hardware devices at atime.

[0007] To eliminate the drawbacks of the serial test method, a paralleltest method can be used. The basic idea is to generate a test thread foreach test item and, as shown in FIG. 1B, all the test items are testedtogether.

[0008] The problem of the parallel test method, however, is thatdifferent test items may interfere with one another. For example, it isimpossible to perform the sequential seek test and the random seek testof the hard disk drive (HDD) together.

[0009] It is thus highly desirable to provide a test method that doesnot only have the high-efficiency, high-quality advantages of theparallel test method, but can also avoid conflictions in test items.

SUMMARY OF THE INVENTION

[0010] In view of the foregoing, the invention provides a multithreadauto test method. According to the exclusion relation among the uniqueIDs of the test items, a multithread executable logic is automaticallygenerated. An appropriate parallel method is employed to find proceduresfor test items that do not have conflictions. Therefore, multithreads oftest procedures are performed to increase the test efficiency andquality.

[0011] The disclosed multithread auto test method includes the steps of:

[0012] determining a unique ID of a test item;

[0013] automatically generating a test logic table according to theexclusion relation among the unique IDs; and

[0014] performing multithread test procedure according to the test logicgiven in the test logic table.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The invention will become more fully understood from the detaileddescription given hereinbelow illustration only, and thus are notlimitative of the present invention, and wherein:

[0016]FIG. 1A is a schematic view of the conventional serial testmethod;

[0017]FIG. 1B is a schematic view of the conventional parallel testmethod;

[0018]FIG. 2 is a flowchart of the disclosed multithread auto testmethod;

[0019]FIG. 3 is a flowchart of automatically generating a test logictable according to the invention;

[0020]FIG. 4 is a flowchart of automatically executing a multithreadtest procedure according to the invention;

[0021]FIGS. 5A to 5F are schematic views of the multithread executableprocess according to the invention;

[0022]FIG. 6 is a tree structure diagram of all test items under aparticular test condition;

[0023]FIG. 7 is a schematic view of data formats of test items withunique ID under a particular test condition; and

[0024]FIG. 8 shows a test logic table generated under a particular testcondition.

DETAILED DESCRIPTION OF THE INVENTION

[0025] The invention provides a multithread auto test method. Thismethod is proposed to solve, in particular, the problems existing in theprior art when the serial or parallel test method is used to testcomputer hardware. The method uses the exclusion relation among theunique IDs of test items to automatically generate a test logic table.The multithread test process is then performed according to the testlogic in the logic table.

[0026] A preferred embodiment is shown in FIG. 2 to demonstrate thefeasibility of the invention. First, the system determines a unique IDof a test item (step 201). A test logic table is automatically generatedaccording to the exclusion relations among the unique IDs (step 202).The multithread test process is executed according to the test logicgiven in the logic table (step 203).

[0027] The unique ID of the test item can be the logic device name ofthe test item. It is provided according to the character of each testitem and used to indicate which device is tested in the test item. Thename setting standard is to include all tests items into several relatedtree structures.

[0028]FIG. 6 is a tree view diagram of all test items in accordance withthe invention. The logic device name of the first hard drive HD1sequential seek test item is “System.Hard Disk.HD1.Sequential Seek.”Analogously, the logic device name of the floppy disk test item is“System.Floppy Disk.FD Test.”

[0029] With reference to FIG. 7, to facilitate the description we cancomprehend the logic device name as composed of two parts: “device name”and “test name.” For example, “System.Hard Disk.HD1.Sequential Seek” hasa device name “System.Hard Disk.HD1” and a test name “Sequential Seek.”

[0030]FIG. 8 shows a test logic table generated under some testcondition. In the table, “yes” means that the test items can beperformed together; “no” means that the test items cannot be performedat the same time. For example, HD1.Sequential Seek can be tested withHD2.Sequential Seek, but not HD1.Random Seek.

[0031]FIG. 3 shows the flowchart of automatically generating a testlogic table according to the disclosed method. First, the system obtainsthe unique IDs of all test items and writes the unique IDs into the testlogic table, as shown in FIG. 8 (step 301). The system analyzes thedevice name of the unique ID and writes into the test logic table (step302). The system then compares the device names of any two test items(step 303). If two test items are detected to have the same device name,then the two test items cannot be test together and the logic values ofthe corresponding fields in the test logic table are set to “no”(meaning that the two test items exclude each other) (step 304). If thedevice names of two test items are different, then they can be tested atthe same time and the logic values of the corresponding fields are setto “yes” (meaning that the two test items do not exclude each other)(step 305). The obtain logic values are then filled into thecorresponding fields in the test logic table (step 306). The systemdetermines whether the comparisons of all test items are done (step307). If so, then the procedure finishes; otherwise, step 302 continues.

[0032] In the test logic table shown in FIG. 8, since “HD1.SequentialSeek” and “HD1.Random Seek” have the same device name, they cannot betested at the same time. The logic values of the corresponding fieldsare “no.”

[0033] The test logic table defines the exclusion relations among alltest items, i.e. whether a particular test item can be performedparallel with other test items. The test logic table is automaticallygenerated by the system according to the logic device names of the testitems.

[0034] After the system generates the test logic table, a multithreadmethod is employed to perform tests. In order to do this, the system hastwo queues: the test queue and the executable queue. The test queue hasall tests that are to be performed and the executable queue has thetests that are being performed at some point.

[0035]FIG. 4 shows the flowchart of executing multithread testsaccording to the disclosed method. First, the test queue has all testitems to be performed and the executable queue is empty (step 401). Thesystem obtains a test item from the test queue and puts it in theexecutable queue, and generates a corresponding test procedure (step402). Afterwards, the system scans all the test items in the test queueand finds all those that can be performed at the same time with the testitem in the executable queue. All the test items thus found are put intothe executable queue, and the system generates the corresponding testprocedure (step 403). Once a test in the executable queue is done, italong with its test procedure is removed from the executable queue (step404). The system determines whether all the tests in the executablequeue are finished (step 405). If not yet, steps 403 and 404 arerepeated until all the tests in the executable queue are finished.

[0036] The scanning rule of step 403 is determined by the test logicgiven in the test logic table.

[0037] With reference to FIGS. 5A to 5F, an embodiment with four teststo be performed is used as an example to explain the invention.

[0038]FIG. 5A represents the initial status. The test queue has all thetest items and the executable queue is empty.

[0039]FIGS. 5B and 5C show that the system first puts the test item 1into the executable queue and generates a test procedure 1. The systemkeeps scanning all tests in the test queue that can be performed at thesame time with the test 1 in the executable queue. Suppose the test 3can be performed with the test 1, then it is moved to the executablequeue and the system generates a test procedure 3. Whether two testitems can be performed at the same time is determined according to thetest logic table automatically generated from the tests by the system.

[0040]FIGS. 5D, 5E and 5F mean that if a particular test (e.g. the test1) is done, it is removed from the executable queue. The system scansthe test queue again. This process continues until all test items in thetest queue are done.

EFFECTS OF THE INVENTION

[0041] 1. In the invention, each test is not definitely performed in theserial or parallel manner. They are performed using an appropriateparallel method that does not have conflictions. Therefore, the testingtime is shortened and the production yield increases.

[0042] 2. In the invention, the system does not perform all the testitems at the same time without any consideration. The systemautomatically generates a test logic table. The system determines whichtest items can be performed together according to the states indicatedin the test logic table, and which test items should be performedseparately to avoid conflictions.

[0043] 3. The executable logic of the multithread procedures isautomatically generated, instead of by the user. The system canautomatically generates a test logic table according to the unique IDs(such as logic device names) of the test items. The table is notproduced manually; therefore, the operation is simplified and the errorprobability is greatly lowered.

[0044] While the invention has been described by way of example and interms of the preferred embodiment, it is to be understood that theinvention is not limited to the disclosed embodiments. To the contrary,it is intended to cover various modifications and similar arrangementsas would be apparent to those skilled in the art. Therefore, the scopeof the appended claims should be accorded the broadest interpretation soas to encompass all such modifications and similar arrangements.

What is claimed is:
 1. A multithread auto test method for testingcomputer hardware, the method comprising the steps of: determining aunique ID for each test; automatically generating a test logic tableaccording to exclusion relations among the unique IDs; and executing amultithread test procedure according to the test logic given in the testlogic table.
 2. The method of claim 1, wherein the unique ID is a logicdevice name of the test.
 3. The method of claim 1, wherein the dataformat of the unique ID is comprised of a “device name” and a “testname.”
 4. The method of claim 1, wherein the step of automaticallygenerating a test logic table comprises the steps of: obtaining theunique IDs of all tests to be performed and writing them into the testlogic table; analyzing the device name of each of the unique IDs andwriting them into the test logic table; comparing the device names oftwo tests; putting the logic values given by the comparison result intothe corresponding fields in the test logic table; and determiningwhether all tests have been done and, if not, redoing the analysis andcomparison.
 5. The method of claim 4, wherein the logic value is set as“no” if the device names of two tests are the same and as “yes” if thedevice names of two tests are different in the step of putting the logicvalues given by the comparison result into the corresponding fields inthe test logic table.
 6. The method of claim 1, wherein the exclusionrelations among the unique IDs are determined by whether the devicenames of the logic device names of the tests are the same so that theexclusion relation holds if two device names are the same and does nothold is two device names are different.
 7. The method of claim 1,wherein the system uses a test queue and an executable queue in the stepof executing a multithread test procedure according to the test logicgiven in the test logic table.
 8. The method of claim 1, wherein thestep of executing a multithread test procedure comprises the steps of:putting all the tests in the test queue and leaving the executable queueempty; obtaining a test item from the test queue and putting it into theexecutable queue, and generating a corresponding test procedure;scanning all the tests in the test queue to find all the tests that canbe performed at the same time with the test item in the executablequeue, moving the tests thus found, if any, into the executable queueand generating the corresponding test procedures; removing a test thatis done and the corresponding test procedure from the executable queue;and determining whether all the tests are done until all the tests aredone.
 9. The method of claim 8, wherein the scanning rule is determinedby the test logic given in the test logic table.
 10. The method of claim7, wherein the test queue has all the tests to be performed.
 11. Themethod of claim 7, wherein the executable queue has the test items thatare being performed at a particular moment.